home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / catn / split.n < prev    next >
Text File  |  1994-09-20  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4. split(n)              Tcl Built-In Commands
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      split - Split a string into a proper Tcl list
  12.  
  13. SYNOPSIS
  14.      split _s_t_r_i_n_g ?_s_p_l_i_t_C_h_a_r_s?
  15. _________________________________________________________________
  16.  
  17.  
  18. DESCRIPTION
  19.      Returns a list created by splitting _s_t_r_i_n_g at each character
  20.      that  is  in  the  _s_p_l_i_t_C_h_a_r_s argument.  Each element of the
  21.      result list will consist of the characters from _s_t_r_i_n_g  that
  22.      lie  between  instances  of  the  characters  in _s_p_l_i_t_C_h_a_r_s.
  23.      Empty list elements will be  generated  if  _s_t_r_i_n_g  contains
  24.      adjacent  characters  in _s_p_l_i_t_C_h_a_r_s, or if the first or last
  25.      character of _s_t_r_i_n_g is in _s_p_l_i_t_C_h_a_r_s.  If _s_p_l_i_t_C_h_a_r_s  is  an
  26.      empty  string  then  each  character  of  _s_t_r_i_n_g  becomes  a
  27.      separate element of the result list.  _S_p_l_i_t_C_h_a_r_s defaults to
  28.      the standard white-space characters.  For example,
  29.  
  30.           split "comp.unix.misc" .
  31.  
  32.      returns "comp unix misc" and
  33.  
  34.           split "Hello world" {}
  35.      returns "H e l l o { } w o r l d".
  36.  
  37.  
  38. KEYWORDS
  39.      list, split, string
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Tcl                                                             1
  64.  
  65.  
  66.  
  67.